Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distributed client-side policy evaluation in WASM and Rego #7019

Open
leecalcote opened this issue Feb 6, 2023 · 12 comments
Open

Distributed client-side policy evaluation in WASM and Rego #7019

leecalcote opened this issue Feb 6, 2023 · 12 comments
Labels
issue/design required Functional architecture issue/willfix This issue will be worked on kind/enhancement Improvement in current feature
Milestone

Comments

@leecalcote
Copy link
Member

Current Behavior

Meshery's highly dynamic infrastructure configuration capabilities require real-time evaluation of complex policies. Policies of various types and with a high number of parameters need to be evaluted client-side. With policies expressed in Rego, the goal of this project is to incorporate use of the https://github.com/open-policy-agent/golang-opa-wasm project into Meshery UI, so that a powerful, real-time user experience is possible.

Desired Behavior

Design-required

Implementation

Design-required

Acceptance Tests

Design-required

Mockups

Design-required


Contributor Guides and Handbook

@leecalcote leecalcote added kind/enhancement Improvement in current feature issue/design required Functional architecture labels Feb 6, 2023
@leecalcote leecalcote added this to the v0.8.0 milestone Feb 6, 2023
@github-actions
Copy link

github-actions bot commented Feb 6, 2023

This issue has been labeled with 'design-required'. Note that prior to commencing on implementation, a design specification needs to be created and reviewed for approval. See Creating a Functional Specification to create a design spec.


        Be sure to join the community, if you haven't yet and please leave a ⭐ star on the project 😄

@sivanaikk
Copy link

Hi @leecalcote. I am a 4th-year student from India. I would like to contribute to this project.

@leecalcote leecalcote added the issue/willfix This issue will be worked on label Feb 9, 2023
@acald-creator
Copy link
Contributor

ack, I want to research on this too.

@abhinandanudupa
Copy link
Contributor

@leecalcote So we need this implemented as a Extension (in the extensions page)?

@leecalcote
Copy link
Member Author

@abhinandanudupa join the Slack workspace and let's chat --> http://slack.meshery.io

@prateek041
Copy link

Hey @leecalcote , would you please re-share the slack link ? It is not working.

@satyampsoni
Copy link

Is this project open for LFX?

@satyampsoni
Copy link

Hey who got selected for this project for the summer season?

@leecalcote
Copy link
Member Author

@suhail34 would you like to put some thoughts together here?

@suhail34
Copy link
Contributor

suhail34 commented Jul 4, 2023

I'll do research

@VaibhavMalik4187
Copy link
Contributor

@leecalcote I am interested in working on this project.

@VaibhavMalik4187
Copy link
Contributor

Here is a very high-level proposal I came up with:
Incorporating Real-Time Policy Evaluation Using golang-opa-wasm into Meshery UI
Project Overview:

The goal of this project is to enhance Meshery's infrastructure configuration capabilities by incorporating real-time policy evaluation using the golang-opa-wasm project. Meshery is a widely-used service mesh management platform that provides various features for deploying, managing, and monitoring applications within a service mesh. One of the key challenges is to efficiently evaluate complex policies with multiple parameters in real-time on the client-side. This project aims to integrate the capabilities of golang-opa-wasm into the Meshery UI, enabling users to experience powerful and dynamic policy evaluations.
Project Objectives:

Integration of golang-opa-wasm: Integrate the golang-opa-wasm project into the Meshery UI codebase. This involves embedding the WebAssembly-based OPA (Open Policy Agent) runtime into the UI components.

Policy Expression Support: Enhance the Meshery UI to allow users to input policies expressed in Rego, a query and policy language used by OPA. Develop a user-friendly interface for creating and editing policies.

Real-Time Evaluation: Implement the functionality to dynamically evaluate policies in real-time as users modify parameters or expressions. The UI should provide instant feedback on policy evaluation results.

Parameter Management: Create a mechanism for users to define and manage various parameters within their policies. Users should be able to add, remove, and modify parameters easily.

User-Friendly Experience: Design an intuitive and user-friendly interface for interacting with policies and viewing evaluation results. Consider visual cues, color-coded indicators, and clear error messages to enhance the user experience.

Documentation: Provide comprehensive documentation that explains the integration process, how to write and test policies, and how to utilize the real-time evaluation feature in Meshery UI.

Deliverables:

Integrated golang-opa-wasm runtime within the Meshery UI codebase.
UI components for policy creation, editing, and parameter management.
Real-time policy evaluation mechanism with instant feedback.
Parameter management functionality, allowing users to add, remove, and modify parameters.
Intuitive and user-friendly UI design for interacting with policies and viewing evaluation results.
Well-structured documentation explaining the integration process and demonstrating the use of the real-time policy evaluation feature.

Timeline:

Week 1-2: Familiarization and Environment Setup
    Study the golang-opa-wasm project and understand its integration requirements.
    Set up the development environment for working on the Meshery UI codebase.

Week 3-4: Integration of golang-opa-wasm
    Embed the golang-opa-wasm runtime into the Meshery UI components.
    Ensure proper communication between the UI and the WebAssembly-based OPA runtime.

Week 5-6: Policy Expression Support and Parameter Management
    Develop UI components for creating, editing, and managing policy expressions.
    Implement parameter management functionality.

Week 7-8: Real-Time Evaluation and User-Friendly Experience
    Create the real-time policy evaluation mechanism with instant feedback.
    Design the user interface for interacting with policies and viewing evaluation results.

Week 9-10: Documentation and Testing
    Write comprehensive documentation explaining the integration process and usage of the real-time policy evaluation feature.
    Test the entire workflow thoroughly, identifying and fixing any bugs or issues.

Week 11-12: Finalization and Review
    Perform a complete review of the project implementation.
    Address any feedback and make necessary improvements.
    Prepare the final codebase, documentation, and resources for submission

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/design required Functional architecture issue/willfix This issue will be worked on kind/enhancement Improvement in current feature
Projects
None yet
Development

No branches or pull requests

8 participants